<template>
	<view class="content">
		<button type="primary" @click="onPrint">打印</button>
		<button type="primary" @tap="onManage">设备管理</button>
	</view>
</template>

<script>
	import Bluetooth from '@/common/print/bluetooth.js'

	let bluetooth = new Bluetooth();

	export default {
		components: {},
		data() {
			return {

			}
		},
		//页面打开,获取位置,打开蓝牙链接
		onLoad() {
			// 初始化蓝牙模块
			// bluetooth.openBluetoothAdapter();
			bluetooth.openBluetoothAdapterByMol({
				success:res=>{
					console.log('初始化成功');
					console.log(res);
				},
				fail:err=>{
					console.log('初始化失败');
					console.log(err);
				}
			})
		},
		methods: {
			onPrint() {
				this.$u.route('/pages/print/print');
			},
			onManage() {
				this.$u.route('/pages/printManage/printManage');
			}
		}
	}
</script>

<style>
</style>